using Zhaoxi.Zhihu.Core.AppUserAggregate.Entites;
using Zhaoxi.Zhihu.Core.QuestionAggregate.Entites;
using Zhaoxi.Zhihu.SharedKerel.Paging;

namespace Zhaoxi.Zhihu.UseCases.Common.Queries.Interfaces;

public interface IDaraQueryService
{
    public IQueryable<AppUser> AppUsers { get; }
    
    public IQueryable<FollowQuestion> FollowQuestions { get; }
    
    public IQueryable<FollowUser> FollowUsers { get; }
    
    public IQueryable<Question>  Questions { get; }
    
    public IQueryable<Answer> Answers { get; }
    
    public IQueryable<AnswerLike>  AnswerLikes { get; }
    
    Task<T?> FirstOrDefaultAsync<T>(IQueryable<T> queryable) where T : class;
    
    Task<IList<T>> ToListAsync<T>(IQueryable<T> queryable) where T : class;


    Task<PagedList<T>> PageListAsync<T>(IQueryable<T> queryable, Pagination
        pagination) where T : class;
}